package thread;

public class MyThread extends Thread{

    @Override
    public void run() {
        /*获取当前线程的名称*/
        String name=Thread.currentThread().getName();
        for (int i = 0; i <10 ; i++) {
            System.out.println(name+": "+i);
        }
    }
}